import React from 'react'
import classnames from 'classnames'


type Prop = {
    type: string
    className?: string
    onClick?: () => void
}

export default function Icon({ type, className, onClick }: Prop) {
    return (
        <svg className={classnames('icon', className)} onClick={onClick}>
            <use xlinkHref={`#${type}`}></use>
        </svg>
    )
}
